package javaMultiThreadInAction.chapter01;

/**
 * @author xinya
 * @version 1.0
 * @project javacore
 * @description 1-2 以定义Thread子类的方式定义线程
 * @date 2024/1/9 10:52:04
 */
public class WelcomeApp {
    public static void main(String[] args) {
        Thread welcomeThread = new WelcomeThread();
        welcomeThread.start();
        System.out.printf("2.welcome i'm %s %n", Thread.currentThread().getName());
    }
}

class WelcomeThread extends Thread {
    @Override
    public void run() {
        System.out.printf("2.welcome i'm %s %n", Thread.currentThread().getName());
    }
}
